Optimal. Leaf size=149 \[ -\frac {B (b c-a d)^2 g i n x}{6 b d}+\frac {g i (a+b x)^2 (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 b}+\frac {(b c-a d) g i (a+b x)^2 \left (A-B n+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{6 b^2}+\frac {B (b c-a d)^3 g i n \log (c+d x)}{6 b^2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2559, 2547, 21,
45} \begin {gather*} \frac {g i (a+b x)^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A-B n\right )}{6 b^2}+\frac {g i (a+b x)^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b}+\frac {B g i n (b c-a d)^3 \log (c+d x)}{6 b^2 d^2}-\frac {B g i n x (b c-a d)^2}{6 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 45
Rule 2547
Rule 2559
Rubi steps
\begin {align*} \int (110 c+110 d x) (a g+b g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx &=\int \left (110 a c g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+110 (b c+a d) g x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+110 b d g x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right ) \, dx\\ &=(110 a c g) \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx+(110 b d g) \int x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx+(110 (b c+a d) g) \int x \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx\\ &=110 a A c g x+55 (b c+a d) g x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {110}{3} b d g x^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+(110 a B c g) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx-\frac {1}{3} (110 b B d g n) \int \frac {(b c-a d) x^3}{(a+b x) (c+d x)} \, dx-(55 B (b c+a d) g n) \int \frac {(b c-a d) x^2}{(a+b x) (c+d x)} \, dx\\ &=110 a A c g x+\frac {110 a B c g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+55 (b c+a d) g x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {110}{3} b d g x^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {(110 a B c (b c-a d) g n) \int \frac {1}{c+d x} \, dx}{b}-\frac {1}{3} (110 b B d (b c-a d) g n) \int \frac {x^3}{(a+b x) (c+d x)} \, dx-(55 B (b c-a d) (b c+a d) g n) \int \frac {x^2}{(a+b x) (c+d x)} \, dx\\ &=110 a A c g x+\frac {110 a B c g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+55 (b c+a d) g x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {110}{3} b d g x^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {110 a B c (b c-a d) g n \log (c+d x)}{b d}-\frac {1}{3} (110 b B d (b c-a d) g n) \int \left (\frac {-b c-a d}{b^2 d^2}+\frac {x}{b d}-\frac {a^3}{b^2 (b c-a d) (a+b x)}-\frac {c^3}{d^2 (-b c+a d) (c+d x)}\right ) \, dx-(55 B (b c-a d) (b c+a d) g n) \int \left (\frac {1}{b d}+\frac {a^2}{b (b c-a d) (a+b x)}+\frac {c^2}{d (-b c+a d) (c+d x)}\right ) \, dx\\ &=110 a A c g x-\frac {55 B (b c-a d) (b c+a d) g n x}{3 b d}-\frac {55}{3} B (b c-a d) g n x^2+\frac {110 a^3 B d g n \log (a+b x)}{3 b^2}-\frac {55 a^2 B (b c+a d) g n \log (a+b x)}{b^2}+\frac {110 a B c g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+55 (b c+a d) g x^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {110}{3} b d g x^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {110 b B c^3 g n \log (c+d x)}{3 d^2}-\frac {110 a B c (b c-a d) g n \log (c+d x)}{b d}+\frac {55 B c^2 (b c+a d) g n \log (c+d x)}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 189, normalized size = 1.27 \begin {gather*} \frac {g i \left (-a^2 B d^2 (3 b c+a d) n \log (a+b x)+b \left (d x \left (a^2 B d^2 n-b^2 B c n (c+d x)+A b^2 d x (3 c+2 d x)+a b d (6 A c+3 A d x+B d n x)\right )+B d^2 \left (6 a^2 c+3 a b x (2 c+d x)+b^2 x^2 (3 c+2 d x)\right ) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B c \left (b^2 c^2-3 a b c d+6 a^2 d^2\right ) n \log (c+d x)\right )\right )}{6 b^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int \left (b g x +a g \right ) \left (d i x +c i \right ) \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 388 vs. \(2 (141) = 282\).
time = 0.28, size = 388, normalized size = 2.60 \begin {gather*} \frac {1}{3} i \, B b d g x^{3} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) + \frac {1}{3} i \, A b d g x^{3} + \frac {1}{2} i \, B b c g x^{2} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) + \frac {1}{2} i \, B a d g x^{2} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) + \frac {1}{2} i \, A b c g x^{2} + \frac {1}{2} i \, A a d g x^{2} + \frac {1}{6} i \, B b d g n {\left (\frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} - \frac {1}{2} i \, B b c g n {\left (\frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} - \frac {1}{2} i \, B a d g n {\left (\frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} + i \, B a c g n {\left (\frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} + i \, B a c g x \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) + i \, A a c g x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 281, normalized size = 1.89 \begin {gather*} -\frac {2 \, {\left (-i \, A - i \, B\right )} b^{3} d^{3} g x^{3} - {\left (3 i \, B a^{2} b c d^{2} - i \, B a^{3} d^{3}\right )} g n \log \left (\frac {b x + a}{b}\right ) - {\left (i \, B b^{3} c^{3} - 3 i \, B a b^{2} c^{2} d\right )} g n \log \left (\frac {d x + c}{d}\right ) - {\left ({\left (-i \, B b^{3} c d^{2} + i \, B a b^{2} d^{3}\right )} g n - 3 \, {\left ({\left (-i \, A - i \, B\right )} b^{3} c d^{2} + {\left (-i \, A - i \, B\right )} a b^{2} d^{3}\right )} g\right )} x^{2} + {\left (6 \, {\left (-i \, A - i \, B\right )} a b^{2} c d^{2} g - {\left (-i \, B b^{3} c^{2} d + i \, B a^{2} b d^{3}\right )} g n\right )} x - {\left (2 i \, B b^{3} d^{3} g n x^{3} + 6 i \, B a b^{2} c d^{2} g n x - 3 \, {\left (-i \, B b^{3} c d^{2} - i \, B a b^{2} d^{3}\right )} g n x^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{6 \, b^{2} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1277 vs. \(2 (141) = 282\).
time = 2.69, size = 1277, normalized size = 8.57 \begin {gather*} -\frac {1}{6} \, {\left (\frac {{\left (i \, B b^{5} c^{4} g n - 4 i \, B a b^{4} c^{3} d g n - \frac {3 \, {\left (i \, b x + i \, a\right )} B b^{4} c^{4} d g n}{d x + c} + 6 i \, B a^{2} b^{3} c^{2} d^{2} g n - \frac {12 \, {\left (-i \, b x - i \, a\right )} B a b^{3} c^{3} d^{2} g n}{d x + c} - 4 i \, B a^{3} b^{2} c d^{3} g n - \frac {18 \, {\left (i \, b x + i \, a\right )} B a^{2} b^{2} c^{2} d^{3} g n}{d x + c} + i \, B a^{4} b d^{4} g n - \frac {12 \, {\left (-i \, b x - i \, a\right )} B a^{3} b c d^{4} g n}{d x + c} - \frac {3 \, {\left (i \, b x + i \, a\right )} B a^{4} d^{5} g n}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{3} d^{2} - \frac {3 \, {\left (b x + a\right )} b^{2} d^{3}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b d^{4}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} d^{5}}{{\left (d x + c\right )}^{3}}} + \frac {\frac {{\left (i \, b x + i \, a\right )} B b^{5} c^{4} d g n}{d x + c} - \frac {4 \, {\left (i \, b x + i \, a\right )} B a b^{4} c^{3} d^{2} g n}{d x + c} - \frac {i \, {\left (b x + a\right )}^{2} B b^{4} c^{4} d^{2} g n}{{\left (d x + c\right )}^{2}} - \frac {6 \, {\left (-i \, b x - i \, a\right )} B a^{2} b^{3} c^{2} d^{3} g n}{d x + c} + \frac {4 i \, {\left (b x + a\right )}^{2} B a b^{3} c^{3} d^{3} g n}{{\left (d x + c\right )}^{2}} - \frac {4 \, {\left (i \, b x + i \, a\right )} B a^{3} b^{2} c d^{4} g n}{d x + c} - \frac {6 i \, {\left (b x + a\right )}^{2} B a^{2} b^{2} c^{2} d^{4} g n}{{\left (d x + c\right )}^{2}} + \frac {{\left (i \, b x + i \, a\right )} B a^{4} b d^{5} g n}{d x + c} + \frac {4 i \, {\left (b x + a\right )}^{2} B a^{3} b c d^{5} g n}{{\left (d x + c\right )}^{2}} - \frac {i \, {\left (b x + a\right )}^{2} B a^{4} d^{6} g n}{{\left (d x + c\right )}^{2}} + i \, A b^{6} c^{4} g + i \, B b^{6} c^{4} g - 4 i \, A a b^{5} c^{3} d g - 4 i \, B a b^{5} c^{3} d g - \frac {3 \, {\left (i \, b x + i \, a\right )} A b^{5} c^{4} d g}{d x + c} - \frac {3 \, {\left (i \, b x + i \, a\right )} B b^{5} c^{4} d g}{d x + c} + 6 i \, A a^{2} b^{4} c^{2} d^{2} g + 6 i \, B a^{2} b^{4} c^{2} d^{2} g - \frac {12 \, {\left (-i \, b x - i \, a\right )} A a b^{4} c^{3} d^{2} g}{d x + c} - \frac {12 \, {\left (-i \, b x - i \, a\right )} B a b^{4} c^{3} d^{2} g}{d x + c} - 4 i \, A a^{3} b^{3} c d^{3} g - 4 i \, B a^{3} b^{3} c d^{3} g - \frac {18 \, {\left (i \, b x + i \, a\right )} A a^{2} b^{3} c^{2} d^{3} g}{d x + c} - \frac {18 \, {\left (i \, b x + i \, a\right )} B a^{2} b^{3} c^{2} d^{3} g}{d x + c} + i \, A a^{4} b^{2} d^{4} g + i \, B a^{4} b^{2} d^{4} g - \frac {12 \, {\left (-i \, b x - i \, a\right )} A a^{3} b^{2} c d^{4} g}{d x + c} - \frac {12 \, {\left (-i \, b x - i \, a\right )} B a^{3} b^{2} c d^{4} g}{d x + c} - \frac {3 \, {\left (i \, b x + i \, a\right )} A a^{4} b d^{5} g}{d x + c} - \frac {3 \, {\left (i \, b x + i \, a\right )} B a^{4} b d^{5} g}{d x + c}}{b^{4} d^{2} - \frac {3 \, {\left (b x + a\right )} b^{3} d^{3}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b^{2} d^{4}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} b d^{5}}{{\left (d x + c\right )}^{3}}} - \frac {{\left (-i \, B b^{4} c^{4} g n + 4 i \, B a b^{3} c^{3} d g n - 6 i \, B a^{2} b^{2} c^{2} d^{2} g n + 4 i \, B a^{3} b c d^{3} g n - i \, B a^{4} d^{4} g n\right )} \log \left (b - \frac {{\left (b x + a\right )} d}{d x + c}\right )}{b^{2} d^{2}} - \frac {{\left (i \, B b^{4} c^{4} g n - 4 i \, B a b^{3} c^{3} d g n + 6 i \, B a^{2} b^{2} c^{2} d^{2} g n - 4 i \, B a^{3} b c d^{3} g n + i \, B a^{4} d^{4} g n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{2} d^{2}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.84, size = 295, normalized size = 1.98 \begin {gather*} \ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (\frac {B\,b\,d\,g\,i\,x^3}{3}+\frac {B\,g\,i\,\left (a\,d+b\,c\right )\,x^2}{2}+B\,a\,c\,g\,i\,x\right )-x\,\left (\frac {\left (\frac {g\,i\,\left (6\,A\,a\,d+6\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3}-\frac {A\,g\,i\,\left (6\,a\,d+6\,b\,c\right )}{6}\right )\,\left (6\,a\,d+6\,b\,c\right )}{6\,b\,d}+A\,a\,c\,g\,i-\frac {g\,i\,\left (2\,A\,a^2\,d^2+2\,A\,b^2\,c^2+B\,a^2\,d^2\,n-B\,b^2\,c^2\,n+8\,A\,a\,b\,c\,d\right )}{2\,b\,d}\right )+x^2\,\left (\frac {g\,i\,\left (6\,A\,a\,d+6\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{6}-\frac {A\,g\,i\,\left (6\,a\,d+6\,b\,c\right )}{12}\right )-\frac {\ln \left (a+b\,x\right )\,\left (B\,a^3\,d\,g\,i\,n-3\,B\,a^2\,b\,c\,g\,i\,n\right )}{6\,b^2}+\frac {\ln \left (c+d\,x\right )\,\left (B\,b\,c^3\,g\,i\,n-3\,B\,a\,c^2\,d\,g\,i\,n\right )}{6\,d^2}+\frac {A\,b\,d\,g\,i\,x^3}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________